﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Page.Master" AutoEventWireup="true" CodeBehind="Listpolicy.aspx.cs" Inherits="HealthInsuranceMgm.Admin.Listpolicy" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


     <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <link href="../Styles/styleJs.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript">
       $(document).ready(function () {
           $("#frmListPolicy").validate({
               errorElement: "span"
           });

       });
    </script>
    <form id="frmListPolicy" runat="server">
        
    <asp:Panel ID="PanelListpolicy" runat="server">
     <fieldset>
            <legend> <h3>List Policies</h3></legend>

        <img src="../images/Add.gif" /><a href="AddPolicy.aspx">Addnew Record</a><br />
&nbsp;<asp:GridView ID="grvPolicy" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="PolicyId"
        onselectedindexchanging="grvPolicy_SelectedIndexChanging"
        ClientIDMode="Static" Width="627px" onrowcommand="grvPolicy_RowCommand" 
        onsorting="grvPolicy_Sorting" AllowSorting="True" 
        onrowdatabound="grvPolicy_RowDataBound" 
        onrowdeleting="grvPolicy_RowDeleting" 
        
        AllowPaging="True" 
                onpageindexchanging="grvPolicy_PageIndexChanging" PageSize="15" 
                BorderColor="#CCCCCC" BorderStyle="Solid">
        <Columns>
            <asp:BoundField DataField="PolicyId" HeaderText="PolicyId" 
                SortExpression="PolicyId" />
            <asp:BoundField DataField="PolicyName" HeaderText="Policy Name" />
            <asp:BoundField DataField="PolicyDesc" HeaderText="Description" />
            <asp:BoundField DataField="Amount" HeaderText="Amount" />
            <asp:BoundField DataField="Emi" HeaderText="EMI" />
              <asp:BoundField DataField="CompanyId" HeaderText="CompanyId" />
                <asp:BoundField DataField="MedicalId" HeaderText="MedicalId" />
            <asp:CommandField ShowSelectButton="True" ButtonType="Image" 
                SelectImageUrl="~/images/Edit.gif" SelectText=""/>
           
           <asp:TemplateField> 
                    <ItemTemplate>
                      
       <asp:LinkButton ID="LinkButton1" 
         CommandArgument='<%# Eval("PolicyId") %>' 
         CommandName="Delete" runat="server">
            <img src="../images/Delete.png" style="border:0px" />
         </asp:LinkButton>
                    </ItemTemplate>
                    </asp:TemplateField> 
        </Columns>
                <PagerSettings PageButtonCount="15" />

    </asp:GridView>
 
    <asp:HiddenField Visible ="true" ID="HiddenField1" runat="server" />
     </fieldset>
    </asp:Panel>

    <asp:Panel ID="PanelUpdatePolicy" runat="server">
  <fieldset>
    <legend><h3>Update Info Policy</h3></legend>
     <table>
            <tr>
                <td>Policy Name:</td>
                 <td>
                     <asp:TextBox ID="txtpolicyname" CssClass="required" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Description:</td>
                 <td><asp:TextBox ID="txtdes" CssClass="required" runat="server" Height="95px" TextMode="MultiLine" 
                         Width="234px"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Amount:</td>
                 <td><asp:TextBox ID="txtamount" CssClass="required number" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Emi:</td>
                 <td><asp:TextBox ID="txtemi" CssClass="required number" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Company Id:</td>
                 <td>
                     <asp:DropDownList ID="ddlCompanyId" runat="server">
                         <asp:ListItem></asp:ListItem>
                     </asp:DropDownList>
                 </td>
            </tr>
             <tr>
                <td>Medical Id:</td>
                 <td><asp:TextBox ID="txtmedicalid" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
             <tr>
                <td></td>
                 <td>
                     <asp:Button ID="btnupdate" runat="server" Text="Update" onclick="btnupdate_Click" />
                     <asp:Button ID="btnReset" runat="server"  Text="Reset" />
                     <a href="Listpolicy.aspx">List Policy</a>
                 </td>
            </tr>
            </table>
  </fieldset>
    </asp:Panel>
   

   </form>

   
</asp:Content>
